from collections import defaultdict, deque

class GraphTheoryServices:
    def __init__(self):
        # 使用邻接图表示图
        self.graph = defaultdict(list)

    